package com.niuwa.p2p.action;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.niuwa.p2p.entity.customer.Customer;
import com.niuwa.p2p.service.redenvelope.IRedEnevlopeGenerateService;

@Namespace("/test")
@Controller
public class TestAction extends JsonAction {
	@Autowired
	private IRedEnevlopeGenerateService  redEnvelopeGenerageService;
	
	@Action("test")
	public String test(){
		Customer cust = new Customer();
		cust.setId(901L);
		cust.setLoginName("jsj123");
		cust.setCustKind("NEW_CUST");
		cust.setReferee(902);
		redEnvelopeGenerageService.generateByRegister(cust);
		return NONE;
	}
	
	
	
	
	@Action("index")
	public String index(){
		return "index";
	}
}
